import { useState } from 'react';
import styles from './index.less';
import { history } from 'umi';

const Features = () => {
  const [MsgList, setMsgList] = useState([{}]);
  const goQuestion = () => {
    history.push('/index/question');
  };
  const gomsgDetail = () => {
    history.push('/index/msgdetail');
  };
  return (
    <>
      <div className={styles.content}>
        <div className={styles.searchs}>
          <input
            className={styles.search}
            type="text"
            placeholder="请输入关键词查找"
          />
          <button>搜索</button>
        </div>
        <div className={styles.bodys}>
          <div className={styles.itemMsg}>
            <div className={styles.header}>
              <div className={styles.left}>
                <img
                  src="https://img1.baidu.com/it/u=592570905,1313515675&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1661446800&t=e8347714104eb522b969f07cfa104825"
                  alt=""
                />
                <div className={styles.font}>
                  <p>王女士</p>
                  <p>厂房出租</p>
                </div>
              </div>
              <div className={styles.right}>
                <img src={require('../../asset/phone.png')} alt="" />
                <p>拨打电话</p>
              </div>
            </div>
            <div className={styles.content}>
              <div className={styles.wenzi}>
                <p>sdfsdfsdf</p>
                <p>sdfsdfsdf</p>
                <p>sdfsdfsdf</p>
                <p>sdfsdfsdf</p>
              </div>
              <div className={styles.imgs}>
                <img
                  src="https://img0.baidu.com/it/u=1944477710,3547547872&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1661446800&t=c7295922972e4927a1a024cc9954f8b0"
                  alt=""
                />
              </div>
            </div>
            <div className={styles.bottom}>
              <span onClick={gomsgDetail}>查看详情&gt;&gt;&gt;</span>
            </div>
          </div>
          <div className={styles.itemMsg}>
            <div className={styles.header}>
              <div className={styles.left}>
                <img
                  src="https://img1.baidu.com/it/u=592570905,1313515675&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1661446800&t=e8347714104eb522b969f07cfa104825"
                  alt=""
                />
                <div className={styles.font}>
                  <p>王女士</p>
                  <p>厂房出租</p>
                </div>
              </div>
              <div className={styles.right}>
                <img src={require('../../asset/phone.png')} alt="" />
                <p>拨打电话</p>
              </div>
            </div>
            <div className={styles.content}>
              <div className={styles.wenzi}>
                <p>sdfsdfsdf</p>
                <p>sdfsdfsdf</p>
                <p>sdfsdfsdf</p>
                <p>sdfsdfsdf</p>
              </div>
              <div className={styles.imgs}>
                <img
                  src="https://img0.baidu.com/it/u=1944477710,3547547872&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1661446800&t=c7295922972e4927a1a024cc9954f8b0"
                  alt=""
                />
              </div>
            </div>
            <div className={styles.bottom}>
              <span onClick={gomsgDetail}>查看详情&gt;&gt;&gt;</span>
            </div>
          </div>
        </div>
        <div className={styles.circle} onClick={goQuestion}>
          <img src={require('../../asset/edit.png')} alt="" />
          <p>发布信息</p>
        </div>
      </div>
    </>
  );
};

export default Features;
